//using SqlSugar;

namespace Model
{
    /// <summary>
    /// 
    /// </summary>
    public class Rooms
    {
        /// <summary>
        /// 
        /// </summary>
        public Rooms()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// 
        [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public System.Int32 Id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String No { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.Int32? BuildingId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String BuilingNo { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.Int32? Unit { get; set; }

        /// <summary>
        /// 层
        /// </summary>
        public System.Int32? Layer { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String OwnerId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String OwnerName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String Tel { get; set; }

        /// <summary>
        /// 建筑面积
        /// </summary>
        public System.Decimal? Floorage { get; set; }

        /// <summary>
        /// 收费系数
        /// </summary>
        public System.Decimal? ChargeRate { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String State { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String StateName { get; set; }

        /// <summary>
        /// 房型
        /// </summary>
        public System.String RoomType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.Int32? Section { get; set; }
       
        
        public System.DateTime MoveInfoTime { get; set; }
        
        
        public System.DateTime PMFeeCollectTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public System.String Remark { get; set; }





        DataContext data = new DataContext();

        [SqlSugar.SugarColumn(IsIgnore =true)]
        public  System.Decimal? YingjiaoWuyeFei 
        {
            get
            {
                var price = data.DB.Queryable<Costs>().Where(c => c.Name == "物业费").First().Price;
                return Floorage * price;
            }
        }
    }
}